<template>
  <div class="item-content">
  <a @click="showimg()">
  <img class="ite-img lazy" :data-src='ite.img_thumbnail|fillImgShot' @load="load" v-if="idx>6">
  <img class="ite-img" :src='ite.img_thumbnail|fillImgShot' @load="load" v-else>
  </a>
  <span class="add-to-basket">
    <Button icon="ios-add" type="success" shape="circle" title="放入收藏篮" v-if="isShowBtnAddToBasket"></Button>
    <Button icon="md-thumbs-up" type="success" shape="circle" title="点赞"></Button>
    <Button icon="md-close" type="error" shape="circle" title="移出收藏篮"  v-if="isShowBtnRemoveFromBasket"></Button>
  </span>
  </div>
</template>

<script>
export default {
  props:['ite','idx'],
  data(){
    return{
      height:0,
      isShowBtnRemoveFromBasket:false,
      isShowBtnAddToBasket:true
    }
  },  
  methods:{
    load(){
      this.ite.height = this.$el.offsetHeight
    },
    showimg(){
      this.$emit('showimg', this.ite)
    }
  }
}
</script>